# Generated by Django 5.0.4 on 2024-04-22 06:19

import django.core.validators
import users.services
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('body', models.CharField(max_length=500)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['created'],
            },
        ),
        migrations.CreateModel(
            name='Reward',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reward_name', models.CharField(max_length=100, verbose_name='Награда')),
                ('slug', models.SlugField(max_length=100)),
                ('reward_img', models.ImageField(upload_to=users.services.get_path_upload_reward, validators=[users.services.validate_size_image])),
            ],
            options={
                'verbose_name': 'Награда',
                'verbose_name_plural': 'Награды',
            },
        ),
        migrations.CreateModel(
            name='Tasks',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=35, null=True, verbose_name='Заголовок')),
                ('description', models.CharField(blank=True, max_length=300, null=True, verbose_name='Описание')),
                ('creation_date', models.DateTimeField(auto_now_add=True)),
                ('is_done', models.BooleanField(default=False, verbose_name='Выполнено')),
                ('ended_date', models.DateField(blank=True, null=True)),
                ('done_comment', models.CharField(blank=True, max_length=300, null=True, verbose_name='Комментарий')),
                ('year', models.CharField(blank=True, max_length=4, null=True, verbose_name='Год создания')),
                ('status', models.CharField(choices=[('AC', 'Active'), ('DN', 'Done'), ('EM', 'Empty')], default='EM', max_length=2, verbose_name='Статус')),
                ('start_img', models.ImageField(blank=True, null=True, upload_to=users.services.get_path_upload_photo, validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['jpg', 'JPG', 'JPEG', 'PNG', 'bmp', 'png', 'jpeg']), users.services.validate_size_image], verbose_name='начальное изображение')),
                ('end_img', models.ImageField(blank=True, null=True, upload_to=users.services.get_path_upload_photo, validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['jpg', 'JPG', 'JPEG', 'PNG', 'bmp', 'png', 'jpeg']), users.services.validate_size_image], verbose_name='итоговое изображение')),
            ],
            options={
                'verbose_name': 'Задача',
                'verbose_name_plural': 'Задачи',
                'ordering': ['-creation_date'],
            },
        ),
    ]
